﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Alma.Infrastructure;
using Alma.Enums;
using System.Data.Linq.Mapping;

namespace Alma.Models
{
    [Table(Name = "ProjectExps")]
    public class ProjectExperienceInfo : NotificationObject
    {
        public ProjectExperienceInfo() { }

        public ProjectExperienceInfo(AccountInfo account)
        {
            AccountGuid = account.Guid;
        }

        public ProjectExperienceInfo(string _accountGuid)
        {
            AccountGuid = _accountGuid;
        }

        #region Fields
        private int id;
        private string accountGuid;
        private string projectName;
        private DateTime startDate = DateTime.Now;
        private DateTime endDate;
        private string developTool;
        private string hardwareEnvironment;
        private string softwareEnvironment;
        private string description;
        private string responsibility;
        #endregion

        #region Properties
        [Column(Name = "Id", IsPrimaryKey = true, CanBeNull = false, IsDbGenerated = true, DbType = "INT NOT NULL Identity", AutoSync = AutoSync.OnInsert)]
        public int Id
        {
            get { return id; }
            set
            {
                id = value;
                RaisePropertyChanged(() => Id);
            }
        }

        [Column]
        public string AccountGuid
        {
            get { return accountGuid; }
            set
            {
                accountGuid = value;
                RaisePropertyChanged(() => AccountGuid);
            }
        }

        [Column]
        public string ProjectName
        {
            get { return projectName; }
            set
            {
                projectName = value;
                RaisePropertyChanged(() => ProjectName);
            }
        }

        [Column]
        public DateTime StartDate
        {
            get { return startDate; }
            set
            {
                startDate = value;
                RaisePropertyChanged(() => StartDate);
            }
        }

        [Column]
        public DateTime EndDate
        {
            get { return endDate; }
            set
            {
                endDate = value;
                RaisePropertyChanged(() => EndDate);
            }
        }

        [Column]
        public string DevelopTool
        {
            get { return developTool; }
            set
            {
                developTool = value;
                RaisePropertyChanged(() => DevelopTool);
            }
        }

        [Column]
        public string HardwareEnvironment
        {
            get { return hardwareEnvironment; }
            set
            {
                hardwareEnvironment = value;
                RaisePropertyChanged(() => HardwareEnvironment);
            }
        }

        [Column]
        public string SoftwareEnvironment
        {
            get { return softwareEnvironment; }
            set
            {
                softwareEnvironment = value;
                RaisePropertyChanged(() => SoftwareEnvironment);
            }
        }

        [Column]
        public string Description
        {
            get { return description; }
            set
            {
                description = value;
                RaisePropertyChanged(() => Description);
            }
        }

        [Column]
        public string Responsibility
        {
            get { return responsibility; }
            set
            {
                responsibility = value;
                RaisePropertyChanged(() => Responsibility);
            }
        }
        #endregion
    }
}
